Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
P(mark(X)) → P(X)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
ACTIVE(p(s(X))) → MARK(X)
CONS(X1, active(X2)) → CONS(X1, X2)
ACTIVE(f(0)) → F(s(0))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(p(X)) → MARK(X)
MARK(f(X)) → MARK(X)
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
F(active(X)) → F(X)
F(mark(X)) → F(X)
S(active(X)) → S(X)
S(mark(X)) → S(X)
MARK(s(X)) → S(mark(X))
ACTIVE(f(0)) → S(0)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
P(active(X)) → P(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(p(X)) → P(mark(X))
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(f(0)) → CONS(0, f(s(0)))
MARK(0) → ACTIVE(0)
MARK(f(X)) → F(mark(X))
ACTIVE(f(s(0))) → P(s(0))
CONS(active(X1), X2) → CONS(X1, X2)
ACTIVE(f(s(0))) → F(p(s(0)))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
P(mark(X)) → P(X)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
ACTIVE(p(s(X))) → MARK(X)
CONS(X1, active(X2)) → CONS(X1, X2)
ACTIVE(f(0)) → F(s(0))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(p(X)) → MARK(X)
MARK(f(X)) → MARK(X)
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
F(active(X)) → F(X)
F(mark(X)) → F(X)
S(active(X)) → S(X)
S(mark(X)) → S(X)
MARK(s(X)) → S(mark(X))
ACTIVE(f(0)) → S(0)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
P(active(X)) → P(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(p(X)) → P(mark(X))
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(f(0)) → CONS(0, f(s(0)))
MARK(0) → ACTIVE(0)
MARK(f(X)) → F(mark(X))
ACTIVE(f(s(0))) → P(s(0))
CONS(active(X1), X2) → CONS(X1, X2)
ACTIVE(f(s(0))) → F(p(s(0)))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 5 SCCs with 10 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

P(active(X)) → P(X)
P(mark(X)) → P(X)

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

P(active(X)) → P(X)
P(mark(X)) → P(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(mark(X)) → S(X)
S(active(X)) → S(X)

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(active(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(X1, active(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

F(mark(X)) → F(X)
F(active(X)) → F(X)

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

F(mark(X)) → F(X)
F(active(X)) → F(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
ACTIVE(p(s(X))) → MARK(X)
MARK(f(X)) → MARK(X)
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(f(X)) → MARK(X)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 2·x1   
POL(MARK(x1)) = 2·x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(f(x1)) = 2 + 2·x1   
POL(mark(x1)) = x1   
POL(p(x1)) = x1   
POL(s(x1)) = 2·x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(p(s(X))) → MARK(X)

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → ACTIVE(s(mark(X)))
The remaining pairs can at least be oriented weakly.

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(p(s(X))) → MARK(X)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(f(x1)) = 1   
POL(mark(x1)) = 0   
POL(p(x1)) = 1   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
p(active(X)) → p(X)
p(mark(X)) → p(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
ACTIVE(p(s(X))) → MARK(X)
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(p(X)) → MARK(X)
ACTIVE(p(s(X))) → MARK(X)
The remaining pairs can at least be oriented weakly.

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(f(x1)) = 0   
POL(mark(x1)) = x1   
POL(p(x1)) = 1 + x1   
POL(s(x1)) = x1   

The following usable rules [17] were oriented:

mark(0) → active(0)
active(f(0)) → mark(cons(0, f(s(0))))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(p(s(X))) → mark(X)
mark(s(X)) → active(s(mark(X)))
mark(f(X)) → active(f(mark(X)))
active(f(s(0))) → mark(f(p(s(0))))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
p(active(X)) → p(X)
p(mark(X)) → p(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
MARK(f(X)) → ACTIVE(f(mark(X)))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(p(X)) → ACTIVE(p(mark(X)))
The remaining pairs can at least be oriented weakly.

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
MARK(f(X)) → ACTIVE(f(mark(X)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 0   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(f(x1)) = 0   
POL(mark(x1)) = x1   
POL(p(x1)) = 1   
POL(s(x1)) = x1   

The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(f(X)) → ACTIVE(f(mark(X)))
ACTIVE(f(0)) → MARK(cons(0, f(s(0))))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(f(0)) → MARK(cons(0, f(s(0))))
The remaining pairs can at least be oriented weakly.

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(f(X)) → ACTIVE(f(mark(X)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 1   
POL(MARK(x1)) = x1   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = x1   
POL(f(x1)) = 1   
POL(mark(x1)) = 0   
POL(p(x1)) = 0   
POL(s(x1)) = x1   

The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(f(X)) → ACTIVE(f(mark(X)))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ AND
QDP
                                      ↳ Instantiation
                                    ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(f(X)) → ACTIVE(f(mark(X)))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule MARK(f(X)) → ACTIVE(f(mark(X))) we obtained the following new rules:

MARK(f(p(s(0)))) → ACTIVE(f(mark(p(s(0)))))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ AND
                                    ↳ QDP
                                      ↳ Instantiation
QDP
                                          ↳ QDPOrderProof
                                    ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(f(s(0))) → MARK(f(p(s(0))))
MARK(f(p(s(0)))) → ACTIVE(f(mark(p(s(0)))))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(f(s(0))) → MARK(f(p(s(0))))
The remaining pairs can at least be oriented weakly.

MARK(f(p(s(0)))) → ACTIVE(f(mark(p(s(0)))))
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( active(x1) ) =
/0\
\0/
+
/10\
\01/
·x1

M( cons(x1, x2) ) =
/0\
\0/
+
/00\
\00/
·x1+
/00\
\00/
·x2

M( f(x1) ) =
/0\
\0/
+
/01\
\00/
·x1

M( mark(x1) ) =
/0\
\0/
+
/10\
\01/
·x1

M( p(x1) ) =
/0\
\0/
+
/01\
\10/
·x1

M( s(x1) ) =
/0\
\1/
+
/01\
\10/
·x1

M( 0 ) =
/1\
\0/

Tuple symbols:
M( MARK(x1) ) = 0+
[0,0]
·x1

M( ACTIVE(x1) ) = 0+
[1,0]
·x1


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:

f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
p(active(X)) → p(X)
p(mark(X)) → p(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(0) → active(0)
active(f(0)) → mark(cons(0, f(s(0))))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(p(s(X))) → mark(X)
mark(s(X)) → active(s(mark(X)))
mark(f(X)) → active(f(mark(X)))
active(f(s(0))) → mark(f(p(s(0))))
mark(p(X)) → active(p(mark(X)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ AND
                                    ↳ QDP
                                      ↳ Instantiation
                                        ↳ QDP
                                          ↳ QDPOrderProof
QDP
                                              ↳ DependencyGraphProof
                                    ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MARK(f(p(s(0)))) → ACTIVE(f(mark(p(s(0)))))

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ AND
                                    ↳ QDP
QDP
                                      ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(X))) → mark(X)
mark(f(X)) → active(f(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(p(X)) → active(p(mark(X)))
f(mark(X)) → f(X)
f(active(X)) → f(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
p(mark(X)) → p(X)
p(active(X)) → p(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ RuleRemovalProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ AND
                                    ↳ QDP
                                    ↳ QDP
                                      ↳ UsableRulesProof
QDP
                                          ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: